package com.zzy.database.mapper;

import com.zzy.database.pojo.Account;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

@Mapper
public interface AccountMapper {
    void openAccount(Account account);
    void deleteAccount(String accountId);
    Account getAccountInfo(String accountId);
    List<Account> getAccountsByCustomerId(String customerId);
    List<Account> getAllAccounts();
    List<Account> getAccountsByBranchId(String branchId);
    int updateAccountBalance(@Param("accountId") String accountId, @Param("amount") double amount);
    double getTotalBalanceByBranch(String branchId);
    int checkCustomerExists(String customerId);
    int checkBranchExists(String branchId);
}